package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 采购明细类
 */
@Data
@ApiModel(value = "采购明细类")
@TableName("t_buyInfo")
public class BuyInfoBean {
    /*
    （采购详情编号，采购价，采购数量，库存商品外键，库存对象，采购外键）
     */
    @ApiModelProperty(hidden = true)
    @TableId(value = "pk_buyInfoId",type = IdType.AUTO)
    private Integer id;
    @ApiModelProperty(value = "采购价")
    @TableField("bi_price")
    private Integer price;
    @ApiModelProperty(value = "采购数量")
    @TableField("bi_num")
    private Integer num;
    @ApiModelProperty(value = "库存商品外键")
    @TableField("fk_goodsId")
    private Integer goodsId;
    @ApiModelProperty(value = "库存对象")
    @TableField(exist = false)
    private GoodsBean goodsBean;
    @ApiModelProperty(value = "采购记录外键")
    @TableField("fk_buyId")
    private Integer buyId;

    public BuyInfoBean() {
    }

    public BuyInfoBean(Integer price, Integer num, Integer goodsId, Integer buyId) {
        this.price = price;
        this.num = num;
        this.goodsId = goodsId;
        this.buyId = buyId;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getPrice() {
        return price;
    }

    public void setPrice(Integer price) {
        this.price = price;
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    public Integer getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(Integer goodsId) {
        this.goodsId = goodsId;
    }

    public GoodsBean getGoodsBean() {
        return goodsBean;
    }

    public void setGoodsBean(GoodsBean goodsBean) {
        this.goodsBean = goodsBean;
    }

    public Integer getBuyId() {
        return buyId;
    }

    public void setBuyId(Integer buyId) {
        this.buyId = buyId;
    }

    @Override
    public String toString() {
        return "\nBuyInfoBean{" +
                "id=" + id +
                ", price=" + price +
                ", num=" + num +
                ", goodsId=" + goodsId +
                ", goodsBean=" + goodsBean +
                ", buyId=" + buyId +
                '}';
    }
}
